package com.xinqi.modules.sys.dict.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.sys.dict.domain.DictTypeEntity;
import com.xinqi.modules.sys.dict.dto.req.DictTypeCreateDTO;
import com.xinqi.modules.sys.dict.dto.req.DictTypeUpdateDTO;
import com.xinqi.modules.sys.dict.dto.rsp.DictTypeResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 字典类型表转换
 *
 * @author: linkai
 * @date: 2023/05/21
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class DictTypeConvert {
    public abstract DictTypeEntity create(DictTypeCreateDTO s);

    public abstract DictTypeEntity update(DictTypeUpdateDTO s, @MappingTarget DictTypeEntity t);

    public abstract DictTypeEntity update(DictTypeUpdateDTO s);

    public abstract DictTypeResultDTO convert(DictTypeEntity s);
}
